<?php

namespace common\models\statistics;

use Yii;

/**
 * This is the model class for table "{{%statistics_project_report}}".
 *
 * @property int $id
 * @property int $project_id 项目ID
 * @property int $doctor_id 医生ID
 * @property string $start_time 开始时间
 * @property string $end_time 结束时间
 * @property int $diseases_id 病种ID
 * @property float $consumption 总消费
 * @property float $register_consumption 挂号患者总消费
 * @property int $register_num 挂号人数
 * @property float $register_average 挂号人均
 * @property int $first_visit_num 初诊人数（状态为初诊的患者数）
 * @property float $first_visit_consumption 初诊总消费
 * @property float $first_visit_average 初诊人均
 * @property int $return_visit_num 复诊人数（状态为复诊的患者数）
 * @property float $return_visit_consumption 复诊总消费
 * @property float $return_visit_average 复诊人均
 * @property float $visit_average 总人均
 * @property int $sum_use_308 308使用总个数
 * @property int $use_num_308 308使用人数
 * @property float $use_average_308 308人均使用
 * @property int $sum_buy_308 308购买总个数
 * @property int $buy_num_308 308购买人数
 * @property float $buy_average_308 308人均购买
 * @property int $created_at
 * @property int $updated_at
 */
class ProjectReport extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%statistics_project_report}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['project_id', 'doctor_id', 'diseases_id', 'register_num', 'first_visit_num', 'return_visit_num', 'sum_use_308', 'use_num_308', 'sum_buy_308', 'buy_num_308', 'created_at', 'updated_at'], 'integer'],
            [['start_time', 'end_time'], 'safe'],
            [['end_time', 'diseases_id'], 'required'],
            [['consumption', 'register_consumption', 'register_average', 'first_visit_consumption', 'first_visit_average', 'return_visit_consumption', 'return_visit_average', 'visit_average', 'use_average_308', 'buy_average_308'], 'number'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => '项目ID',
            'doctor_id' => '医生ID',
            'start_time' => '开始时间',
            'end_time' => '结束时间',
            'diseases_id' => '病种ID',
            'consumption' => '总消费',
            'register_consumption' => '挂号患者总消费',
            'register_num' => '挂号人数',
            'register_average' => '挂号人均',
            'first_visit_num' => '初诊人数（状态为初诊的患者数）',
            'first_visit_consumption' => '初诊总消费',
            'first_visit_average' => '初诊人均',
            'return_visit_num' => '复诊人数（状态为复诊的患者数）',
            'return_visit_consumption' => '复诊总消费',
            'return_visit_average' => '复诊人均',
            'visit_average' => '总人均',
            'sum_use_308' => '308使用总个数',
            'use_num_308' => '308使用人数',
            'use_average_308' => '308人均使用',
            'sum_buy_308' => '308购买总个数',
            'buy_num_308' => '308购买人数',
            'buy_average_308' => '308人均购买',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
